<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>OurBarangay.com >> General Information</title>
        <link rel="Stylesheet" href="<?php echo base_url();?>assets/css/general.css" />
        <link rel="Stylesheet" href="<?php echo base_url();?>assets/css/common.css" />
        <script type="text/javascript" src="<?php echo base_url();?>assets/js/jquery/js/jquery-1.6.2.min.js"></script>
        <script type="text/javascript" src="<?php echo base_url();?>assets/js/asynch.js"></script>
        <?php if($this->session->userdata('user_resp') == "admin") { ?>
        <script type="text/javascript" src="<?php echo base_url();?>assets/js/admin_asynch.js"></script>
        <script type="text/javascript" src="<?php echo base_url();?>assets/js/validation.js"></script>
        <?php } ?>
        <style type="text/css">
            .body_right {
                background-color: #fff;
            }
            .prim_inf {
                padding: 0px 8px;
            }
            td.info {
                padding: 7px;
            }
            td.commit {
                text-align: right;
                font-size: 11px;
            }
            td.commit a {
                color: #333;
            }
            td.commit a:hover {
                text-decoration: none;
            }
            textarea {
                width: 637px;
                height: 200px;
            }
            input[type="text"], input[type="password"], .unedit_info, select {
                width: 200px;
            }
            textarea {
                
            }
        </style>
    </head>
    <body>
        <div class="container">
            <?php $this->load->view('main_admin_panel'); ?>
            <?php $this->load->view('main_head'); ?>
            <div class="body">
                <?php $this->load->view('main_body_left'); ?>
                <div class="body_right">
                    <div class="prim_inf">
                        <div class="main_article">
                            <span class="main_article_title">Basic Information</span>
                            <hr/>
                            <table>
                                <tr>
                                    <td class="info" colspan="2">
                                        <span class="left_box_art_details">Username</span>
                                        <br />
                                        <span class="unedit_info"><?php echo $this->session->userdata('username');?></span>
                                    </td>
                                    <td rowspan="6">
                                        This is the photo part
                                    </td>
                                <tr />
                                <tr>
                                    <td class="info">
                                        <span class="left_box_art_details">Password</span>
                                        <br />
                                        <input type="password" value="value" id="pwdfirst" />
                                    </td>
                                    <td class="info">
                                        <span class="left_box_art_details">Confirm Password</span>
                                        <br />
                                        <input type="password" value="value" id="pwdsecond" />
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="2" class="commit">
                                        <span id="changepwdmsg"></span><a href="#" id="changepwd" onclick="changepwd()">Change Password</a>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="info" colspan="2">
                                        <span class="left_box_art_details">Barangay Name</span>
                                        <br />
                                        <input type="text" id="brgy_name" value="<?php echo $this->session->userdata('barangay');?>" />
                                    </td>
                                </tr>
                                <tr>
                                    <td class="info">
                                        <span class="left_box_art_details">Municipality</span>
                                        <br />
                                        <!--<input type="text" name="municipality" value="<?php echo $this->session->userdata('municipality');?>" />-->
                                        <select id="municipality_val">
                                            <option value="0">Municipality</option>
                                        </select>
                                    </td>
                                    <td class="info">
                                        <span class="left_box_art_details">Province</span>
                                        <br />
                                        <!--<input type="text" name="province" value="<?php echo $this->session->userdata('province');?>" />-->
                                        <select id="province_val" onchange="getmunicipality()">
                                            <option value="0">Province</option>
                                        </select>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="info">
                                        <span class="left_box_art_details">Zip Code</span>
                                        <br />
                                        <input type="text" id="zip" value="<?php echo $this->session->userdata('zip');?>" />
                                    </td>
                                    <td class="info">
                                        <span class="left_box_art_details">Email Address</span>
                                        <br />
                                        <input type="text" id="e_ad" value="<?php echo $this->session->userdata('email');?>" />
                                    </td>
                                    <td class="info">
                                        <span class="left_box_art_details">Contact Number</span>
                                        <br />
                                        <input type="text" id="p_num" value="<?php echo $this->session->userdata('phone');?>" />
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="3" class="commit">
                                        <span id="changebrgyinfopwdmsg"></span><a href="#" id="changebrgyinfo" onclick="changebrgyinfo()">Change Barangay Information</a>
                                    </td>
                                </tr>
                            </table>
                        </div>
                    </div>
                    <div class="prim_inf">
                        <div class="main_article">
                            <span class="main_article_title">Barangay Description</span>
                            <hr/>
                            <table>
                                <tr>
                                    <td colspan="3" class="info">
                                        <span class="left_box_art_details">Short description of your barangay</span>
                                        <br />
                                        <textarea class="general brgy_desc" id="brgy_desc"></textarea>
                                    </td>
                                <tr />
                                <tr>
                                    <td colspan="3" class="commit">
                                        <span id="changebrgydescmsg"></span><a href="#" id="changebrgydesc" onclick="changebrgydesc()">Change Barangay Description</a>
                                    </td>
                                </tr>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
            <div class="footer">
                <div class="footer_brgy_info">
                    Brgy Info
                </div>
                <div class="footer_sysnet">
                    Sysnet
                </div>
            </div>
        </div>
        <script type="text/javascript">
            $(document).ready(function() {
                <?php if($this->session->userdata('barangay_id') != '' || $this->session->userdata('barangay_id') != null) { ?>
                /*
                 * Asynchronous requests that are common
                 **/
                weeklyBulletin();
                latestBarangayUpdate();
                getProvince('<?php echo $this->session->userdata('province');?>', '<?php echo $this->session->userdata('municipality')?>');
                /*
                 * Asynchronous requests that are native to the page
                 **/
                brgyDesc('edit');
                    <?php if($this->session->userdata('user_resp') == "admin") { ?>
                        /*
                         * Admin functionalities here
                         **/
                        
                        
                    <?php } ?>
                <?php } ?>
            });
        </script>
    </body>
</html>
